<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <title>易贝云系统</title>
    <script type="text/javascript" src="__ROOT__/system/js/jquery.min.js"></script>
    <!-- Bootstrap -->
    <link href="__ROOT__/third/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!-- HTML5 Shim and Respond.js IE8 flowers of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]]
    <script src="__ROOT__/system/js/html5shiv.min.js"></script>
    <script src="__ROOT__/system/js/respond.min.js"></script>
    <![endif]-->
    <script src="__ROOT__/third/bootstrap/js/bootstrap.min.js"></script>
    <!-- artDialog -->
    <script type="text/javascript" src="__ROOT__/third/artDialog/jquery.artDialog.js"></script>
    <link rel="stylesheet" type="text/css" href="__ROOT__/third/artDialog/skins/default.css">
    <script type="text/javascript" src="__ROOT__/third/artDialog/artDialog.ext.js"></script>
    <!-- 引入后台样式表 -->
    <link rel="stylesheet" type="text/css" href="__ROOT__/system/css/admin.css">
    <script type="text/javascript" src="__ROOT__/system/js/admin.js"></script>
    <script>
        $(function() {

            // 动作绑定
            $('.ebcms-do').bind('click', function(event) {
                var $this  = $(this);
                if ($this.attr('confirm')) {
                    EBCMS.MSG.confirm($this.attr('confirm'),function(){
                        EBCMS.CORE.ajax({
                            method:$this.attr('method'),
                            url:$this.attr('url'),
                            data:$this.data()
                        });
                    });
                }else{
                    EBCMS.CORE.ajax({
                        method:$this.attr('method'),
                        url:$this.attr('url'),
                        data:$this.data()
                    });
                }
            });
            $('.ebcms-go').bind('click', function(event) {
                var $this  = $(this);
                if ($this.attr('confirm')) {
                    EBCMS.MSG.confirm($this.attr('confirm'),function(){
                        location.href=$this.attr('url');
                    });
                }else{
                    location.href=$this.attr('url');
                }
            });
            $('.ebcms-change').each(function(index, el) {
                $(this).data('value',$(this).val());
            });
            $('.ebcms-refresh').bind('click', function(event) {
                location = location;
                return false;
            });
            $('.ebcms-overflow').each(function(index, el) {
                $(this).width($(this).parent().width()-10);
            });
            $('.ebcms-overflow').bind('dblclick', function(event) {
                if ($(this).width() < 200) {
                    var maxwidth = $(window).width()/2;
                    art.dialog({
                        id:'tips',
                        title:'信息预览',
                        lock: false,
                        fixed: false,
                        drag: true
                    }).content('<div style="max-width:'+maxwidth+'px;">'+$(this).html()+'</div>').show();
                }else{
                    if ($(this).css('overflow') == 'auto') {
                        $(this).css({
                            'overflow': 'hidden',
                            'white-space': 'nowrap'
                        });
                    }else{
                        $(this).css({
                            'overflow': 'auto',
                            'white-space': 'normal'
                        });
                    }
                }
            });
            $('.ebcms-change').change(function() {
                var $this  = $(this);
                if ($this.attr('confirm')) {
                    EBCMS.MSG.confirm($this.attr('confirm'),function(){
                        $this.data('value', $this.val());
                        EBCMS.CORE.ajax({
                            url:$this.attr('url'),
                            data:$this.data()
                        });
                    },function(){
                        $this.val($this.data('value'));
                    });
                }else{
                    $this.data('value', $this.val());
                    EBCMS.CORE.ajax({
                        url:$this.attr('url'),
                        data:$this.data()
                    });
                }
            });
        });
    </script>
</head>
<body>